22 research outputs found

    Faster Dynamic Range Mode

    Get PDF
    In the dynamic range mode problem, we are given a sequence a of length bounded by N and asked to support element insertion, deletion, and queries for the most frequent element of a contiguous subsequence of a. In this work, we devise a deterministic data structure that handles each operation in worst-case O?(N^0.655994) time, thus breaking the O(N^{2/3}) per-operation time barrier for this problem. The data structure is achieved by combining the ideas in Williams and Xu (SODA 2020) for batch range mode with a novel data structure variant of the Min-Plus product

    Simpler Reductions from Exact Triangle

    Full text link
    In this paper, we provide simpler reductions from Exact Triangle to two important problems in fine-grained complexity: Exact Triangle with Few Zero-Weight 44-Cycles and All-Edges Sparse Triangle. Exact Triangle instances with few zero-weight 44-cycles was considered by Jin and Xu [STOC 2023], who used it as an intermediate problem to show 33SUM hardness of All-Edges Sparse Triangle with few 44-cycles (independently obtained by Abboud, Bringmann and Fischer [STOC 2023]), which is further used to show 33SUM hardness of a variety of problems, including 44-Cycle Enumeration, Offline Approximate Distance Oracle, Dynamic Approximate Shortest Paths and All-Nodes Shortest Cycles. We provide a simple reduction from Exact Triangle to Exact Triangle with few zero-weight 44-cycles. Our new reduction not only simplifies Jin and Xu's previous reduction, but also strengthens the conditional lower bounds from being under the 33SUM hypothesis to the even more believable Exact Triangle hypothesis. As a result, all conditional lower bounds shown by Jin and Xu [STOC 2023] and by Abboud, Bringmann and Fischer [STOC 2023] using All-Edges Sparse Triangle with few 44-cycles as an intermediate problem now also hold under the Exact Triangle hypothesis. We also provide two alternative proofs of the conditional lower bound of the All-Edges Sparse Triangle problem under the Exact Triangle hypothesis, which was originally proved by Vassilevska Williams and Xu [FOCS 2020]. Both of our new reductions are simpler, and one of them is also deterministic -- all previous reductions from Exact Triangle or 3SUM to All-Edges Sparse Triangle (including P\u{a}tra\c{s}cu's seminal work [STOC 2010]) were randomized.Comment: To appear in SOSA 202

    Simpler and Higher Lower Bounds for Shortcut Sets

    Full text link
    We provide a variety of lower bounds for the well-known shortcut set problem: how much can one decrease the diameter of a directed graph on nn vertices and mm edges by adding O(n)O(n) or O(m)O(m) of shortcuts from the transitive closure of the graph. Our results are based on a vast simplification of the recent construction of Bodwin and Hoppenworth [FOCS 2023] which was used to show an Ω~(n1/4)\widetilde{\Omega}(n^{1/4}) lower bound for the O(n)O(n)-sized shortcut set problem. We highlight that our simplification completely removes the use of the convex sets by B\'ar\'any and Larman [Math. Ann. 1998] used in all previous lower bound constructions. Our simplification also removes the need for randomness and further removes some log factors. This allows us to generalize the construction to higher dimensions, which in turn can be used to show the following results. For O(m)O(m)-sized shortcut sets, we show an Ω(n1/5)\Omega(n^{1/5}) lower bound, improving on the previous best Ω(n1/8)\Omega(n^{1/8}) lower bound. For all ε>0\varepsilon > 0, we show that there exists a δ>0\delta > 0 such that there are nn-vertex O(n)O(n)-edge graphs GG where adding any shortcut set of size O(n2ε)O(n^{2-\varepsilon}) keeps the diameter of GG at Ω(nδ)\Omega(n^\delta). This improves the sparsity of the constructed graph compared to a known similar result by Hesse [SODA 2003]. We also consider the sourcewise setting for shortcut sets: given a graph G=(V,E)G=(V,E), a set SVS\subseteq V, how much can we decrease the sourcewise diameter of GG, max(s,v)S×V,dist(s,v)<dist(s,v)\max_{(s, v) \in S \times V, \text{dist}(s, v) < \infty} \text{dist}(s,v) by adding a set of edges HH from the transitive closure of GG? We show that for any integer d2d \ge 2, there exists a graph G=(V,E)G=(V, E) on nn vertices and SVS \subseteq V with S=Θ~(n3/(d+3))|S| = \widetilde{\Theta}(n^{3/(d+3)}), such that when adding O(n)O(n) or O(m)O(m) shortcuts, the sourcewise diameter is Ω~(S1/3)\widetilde{\Omega}(|S|^{1/3}).Comment: To appear in SODA 2024. Abstract shortened to fit arXiv requirement

    Faster Monotone Min-Plus Product, Range Mode, and Single Source Replacement Paths

    Get PDF
    One of the most basic graph problems, All-Pairs Shortest Paths (APSP) is known to be solvable in n^{3-o(1)} time, and it is widely open whether it has an O(n^{3-ε}) time algorithm for ε > 0. To better understand APSP, one often strives to obtain subcubic time algorithms for structured instances of APSP and problems equivalent to it, such as the Min-Plus matrix product. A natural structured version of Min-Plus product is Monotone Min-Plus product which has been studied in the context of the Batch Range Mode [SODA'20] and Dynamic Range Mode [ICALP'20] problems. This paper improves the known algorithms for Monotone Min-Plus Product and for Batch and Dynamic Range Mode, and establishes a connection between Monotone Min-Plus Product and the Single Source Replacement Paths (SSRP) problem on an n-vertex graph with potentially negative edge weights in {-M, …, M}. SSRP with positive integer edge weights bounded by M can be solved in Õ(Mn^ω) time, whereas the prior fastest algorithm for graphs with possibly negative weights [FOCS'12] runs in O(M^{0.7519} n^{2.5286}) time, the current best running time for directed APSP with small integer weights. Using Monotone Min-Plus Product, we obtain an improved O(M^{0.8043} n^{2.4957}) time SSRP algorithm, showing that SSRP with constant negative integer weights is likely easier than directed unweighted APSP, a problem that is believed to require n^{2.5-o(1)} time. Complementing our algorithm for SSRP, we give a reduction from the Bounded-Difference Min-Plus Product problem studied by Bringmann et al. [FOCS'16] to negative weight SSRP. This reduction shows that it might be difficult to obtain an Õ(M n^{ω}) time algorithm for SSRP with negative weight edges, thus separating the problem from SSRP with only positive weight edges

    Fine-Grained Complexity and Algorithms for the Schulze Voting Method

    Full text link
    We study computational aspects of a well-known single-winner voting rule called the Schulze method [Schulze, 2003] which is used broadly in practice. In this method the voters give (weak) ordinal preference ballots which are used to define the weighted majority graph (WMG) of direct comparisons between pairs of candidates. The choice of the winner comes from indirect comparisons in the graph, and more specifically from considering directed paths instead of direct comparisons between candidates. When the input is the WMG, to our knowledge, the fastest algorithm for computing all winners in the Schulze method uses a folklore reduction to the All-Pairs Bottleneck Paths problem and runs in O(m2.69)O(m^{2.69}) time, where mm is the number of candidates. It is an interesting open question whether this can be improved. Our first result is a combinatorial algorithm with a nearly quadratic running time for computing all winners. This running time is essentially optimal. If the input to the Schulze winners problem is not the WMG but the preference profile, then constructing the WMG is a bottleneck that increases the running time significantly; in the special case when there are mm candidates and n=O(m)n=O(m) voters, the running time is O(m2.69)O(m^{2.69}), or O(m2.5)O(m^{2.5}) if there is a nearly-linear time algorithm for multiplying dense square matrices. To address this bottleneck, we prove a formal equivalence between the well-studied Dominance Product problem and the problem of computing the WMG. We prove a similar connection between the so called Dominating Pairs problem and the problem of finding a winner in the Schulze method. Our paper is the first to bring fine-grained complexity into the field of computational social choice. Using it we can identify voting protocols that are unlikely to be practical for large numbers of candidates and/or voters, as their complexity is likely, say at least cubic.Comment: 19 pages, 2 algorithms, 2 tables. A previous version of this work appears in EC 2021. In this version we strengthen Theorem 6.2 which now holds also for the problem of finding a Schulze winne

    Algorithms, Reductions and Equivalences for Small Weight Variants of All-Pairs Shortest Paths

    Get PDF
    APSP with small integer weights in undirected graphs [Seidel'95, Galil and Margalit'97] has an O~(nω)\tilde{O}(n^\omega) time algorithm, where ω<2.373\omega<2.373 is the matrix multiplication exponent. APSP in directed graphs with small weights however, has a much slower running time that would be Ω(n2.5)\Omega(n^{2.5}) even if ω=2\omega=2 [Zwick'02]. To understand this n2.5n^{2.5} bottleneck, we build a web of reductions around directed unweighted APSP. We show that it is fine-grained equivalent to computing a rectangular Min-Plus product for matrices with integer entries; the dimensions and entry size of the matrices depend on the value of ω\omega. As a consequence, we establish an equivalence between APSP in directed unweighted graphs, APSP in directed graphs with small (O~(1))(\tilde{O}(1)) integer weights, All-Pairs Longest Paths in DAGs with small weights, approximate APSP with additive error cc in directed graphs with small weights, for cO~(1)c\le \tilde{O}(1) and several other graph problems. We also provide fine-grained reductions from directed unweighted APSP to All-Pairs Shortest Lightest Paths (APSLP) in undirected graphs with {0,1}\{0,1\} weights and #mod c\#_{\text{mod}\ c}APSP in directed unweighted graphs (computing counts mod cc). We complement our hardness results with new algorithms. We improve the known algorithms for APSLP in directed graphs with small integer weights and for approximate APSP with sublinear additive error in directed unweighted graphs. Our algorithm for approximate APSP with sublinear additive error is optimal, when viewed as a reduction to Min-Plus product. We also give new algorithms for variants of #APSP in unweighted graphs, as well as a near-optimal O~(n3)\tilde{O}(n^3)-time algorithm for the original #APSP problem in unweighted graphs. Our techniques also lead to a simpler alternative for the original APSP problem in undirected graphs with small integer weights.Comment: abstract shortened to fit arXiv requirement
    corecore